/**
 * Copyright (c) 2000-2012 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.spreedairy.portal.model;

import com.liferay.portal.model.ModelWrapper;

import java.util.HashMap;
import java.util.Map;

/**
 * <p>
 * This class is a wrapper for {@link CustomFieldValue}.
 * </p>
 *
 * @author    SpreeDairy
 * @see       CustomFieldValue
 * @generated
 */
public class CustomFieldValueWrapper implements CustomFieldValue,
	ModelWrapper<CustomFieldValue> {
	public CustomFieldValueWrapper(CustomFieldValue customFieldValue) {
		_customFieldValue = customFieldValue;
	}

	public Class<?> getModelClass() {
		return CustomFieldValue.class;
	}

	public String getModelClassName() {
		return CustomFieldValue.class.getName();
	}

	public Map<String, Object> getModelAttributes() {
		Map<String, Object> attributes = new HashMap<String, Object>();

		attributes.put("recId", getRecId());
		attributes.put("itemId", getItemId());
		attributes.put("keyName", getKeyName());
		attributes.put("keyValue", getKeyValue());

		return attributes;
	}

	public void setModelAttributes(Map<String, Object> attributes) {
		Long recId = (Long)attributes.get("recId");

		if (recId != null) {
			setRecId(recId);
		}

		Long itemId = (Long)attributes.get("itemId");

		if (itemId != null) {
			setItemId(itemId);
		}

		String keyName = (String)attributes.get("keyName");

		if (keyName != null) {
			setKeyName(keyName);
		}

		String keyValue = (String)attributes.get("keyValue");

		if (keyValue != null) {
			setKeyValue(keyValue);
		}
	}

	/**
	* Returns the primary key of this custom field value.
	*
	* @return the primary key of this custom field value
	*/
	public long getPrimaryKey() {
		return _customFieldValue.getPrimaryKey();
	}

	/**
	* Sets the primary key of this custom field value.
	*
	* @param primaryKey the primary key of this custom field value
	*/
	public void setPrimaryKey(long primaryKey) {
		_customFieldValue.setPrimaryKey(primaryKey);
	}

	/**
	* Returns the rec ID of this custom field value.
	*
	* @return the rec ID of this custom field value
	*/
	public long getRecId() {
		return _customFieldValue.getRecId();
	}

	/**
	* Sets the rec ID of this custom field value.
	*
	* @param recId the rec ID of this custom field value
	*/
	public void setRecId(long recId) {
		_customFieldValue.setRecId(recId);
	}

	/**
	* Returns the item ID of this custom field value.
	*
	* @return the item ID of this custom field value
	*/
	public long getItemId() {
		return _customFieldValue.getItemId();
	}

	/**
	* Sets the item ID of this custom field value.
	*
	* @param itemId the item ID of this custom field value
	*/
	public void setItemId(long itemId) {
		_customFieldValue.setItemId(itemId);
	}

	/**
	* Returns the key name of this custom field value.
	*
	* @return the key name of this custom field value
	*/
	public java.lang.String getKeyName() {
		return _customFieldValue.getKeyName();
	}

	/**
	* Sets the key name of this custom field value.
	*
	* @param keyName the key name of this custom field value
	*/
	public void setKeyName(java.lang.String keyName) {
		_customFieldValue.setKeyName(keyName);
	}

	/**
	* Returns the key value of this custom field value.
	*
	* @return the key value of this custom field value
	*/
	public java.lang.String getKeyValue() {
		return _customFieldValue.getKeyValue();
	}

	/**
	* Sets the key value of this custom field value.
	*
	* @param keyValue the key value of this custom field value
	*/
	public void setKeyValue(java.lang.String keyValue) {
		_customFieldValue.setKeyValue(keyValue);
	}

	public boolean isNew() {
		return _customFieldValue.isNew();
	}

	public void setNew(boolean n) {
		_customFieldValue.setNew(n);
	}

	public boolean isCachedModel() {
		return _customFieldValue.isCachedModel();
	}

	public void setCachedModel(boolean cachedModel) {
		_customFieldValue.setCachedModel(cachedModel);
	}

	public boolean isEscapedModel() {
		return _customFieldValue.isEscapedModel();
	}

	public java.io.Serializable getPrimaryKeyObj() {
		return _customFieldValue.getPrimaryKeyObj();
	}

	public void setPrimaryKeyObj(java.io.Serializable primaryKeyObj) {
		_customFieldValue.setPrimaryKeyObj(primaryKeyObj);
	}

	public com.liferay.portlet.expando.model.ExpandoBridge getExpandoBridge() {
		return _customFieldValue.getExpandoBridge();
	}

	public void setExpandoBridgeAttributes(
		com.liferay.portal.service.ServiceContext serviceContext) {
		_customFieldValue.setExpandoBridgeAttributes(serviceContext);
	}

	@Override
	public java.lang.Object clone() {
		return new CustomFieldValueWrapper((CustomFieldValue)_customFieldValue.clone());
	}

	public int compareTo(
		com.spreedairy.portal.model.CustomFieldValue customFieldValue) {
		return _customFieldValue.compareTo(customFieldValue);
	}

	@Override
	public int hashCode() {
		return _customFieldValue.hashCode();
	}

	public com.liferay.portal.model.CacheModel<com.spreedairy.portal.model.CustomFieldValue> toCacheModel() {
		return _customFieldValue.toCacheModel();
	}

	public com.spreedairy.portal.model.CustomFieldValue toEscapedModel() {
		return new CustomFieldValueWrapper(_customFieldValue.toEscapedModel());
	}

	@Override
	public java.lang.String toString() {
		return _customFieldValue.toString();
	}

	public java.lang.String toXmlString() {
		return _customFieldValue.toXmlString();
	}

	public void persist()
		throws com.liferay.portal.kernel.exception.SystemException {
		_customFieldValue.persist();
	}

	/**
	 * @deprecated Renamed to {@link #getWrappedModel}
	 */
	public CustomFieldValue getWrappedCustomFieldValue() {
		return _customFieldValue;
	}

	public CustomFieldValue getWrappedModel() {
		return _customFieldValue;
	}

	public void resetOriginalValues() {
		_customFieldValue.resetOriginalValues();
	}

	private CustomFieldValue _customFieldValue;
}